home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_08_08
/
8n08106a
< prev
next >
Wrap
Text File
|
1990-07-17
|
672b
|
38 lines
Events and Windows
Richard Rathe MD
Listing 3
/*** text window creation function ***/
void create_t_window(title,wrect,closebox)
char *title;
Rect wrect;
int closebox;
{
/* ... */
/* allocate new window info */
t_windinfo =
(WIND *)NewPtr(sizeof(WIND));
/* allocate new window */
t_window =
NewWindow(NIL,&wrect,
title,TRUE,8,FRONT,closebox,NIL);
/* ... */
/* insert window methods */
t_windinfo->activateproc = t_activate;
t_windinfo->updateproc = t_update;
t_windinfo->keydownproc = t_keydown;
/* etc... */
/* insert info into window refCon */
SetWRefCon(t_window,t_windinfo);
}